package 字符串.easy;

/**
 * @author Lw中
 * @date 2020/8/18 9:11
 */
public class QiLingJiu {

    public static String toLowerCase(String str) {
        char[] chars = str.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] <= 90 && chars[i] >= 65) {
                chars[i] += 32;
            }
        }
        // 将字符数组变成字符串
        return new String(chars);
    }

    public static void main(String[] args) {
        String s = toLowerCase("LOVELY");
        System.out.println(s);
    }

}
